-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(job-runner): surface errors to Snuba admin #6704
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: snuba/manual_jobs/runner.py
Did you find this useful? React with a 👍 or 👎 |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
snuba/manual_jobs/runner.py
Outdated
@@ -134,10 +134,11 @@ def run_job(job_spec: JobSpec) -> JobStatus: | |||
if not job_spec.is_async: | |||
current_job_status = _set_job_status(job_spec.job_id, JobStatus.FINISHED) | |||
job_logger.info("[runner] job execution finished") | |||
except BaseException as e: | |||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this exception type need change? AFAIK, BaseException
is used to catch all exceptions including the ones needed to terminate the program, while Exception
is used to catch exceptions that do not terminate the program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, fixed!
Currently, errors are surfaced to GCP, and Snuba Admin just displays server error. I want to surface the actual error message to Snuba Admin as well